package com.sunop.comment.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @since 2025-03-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("comment")
public class Comment implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主贴id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("uid")
    private Integer uid;

    @TableField("title")
    private String title;

    @TableField("content")
    private String content;

    /**
     * 发布人
     */
    @TableField("author")
    private String author;

    /**
     * 头像
     */
    @TableField("avatar")
    private String avatar;

    /**
     * 评论角色
     */
    @TableField("role")
    private Integer role;

    /**
     * 评论量
     */
    @TableField("comment_num")
    private Integer commentNum;

    /**
     * 浏览量
     */
    @TableField("view_num")
    private Integer viewNum;

    /**
     * 点赞数量
     */
    @TableField("like_num")
    private Integer likeNum;

    /**
     * 置顶
     */
    @TableField("top_priority")
    private Integer topPriority;

    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 题目
     */
    @TableField("to_pid")
    private Integer toPid;


}
